package org.ohuyo.libra.server.model.table;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Index;

/**
 * ��½��¼��
 * 
 * @author rabbit
 * @time ����10:00:15 2009-7-31
 */
@Entity
@Table(name = "T_LOGIN_TICKET")
@org.hibernate.annotations.Table(appliesTo = "T_LOGIN_TICKET", indexes = { @Index(name = "idx_login1", columnNames = { "upd_time" }) })
public class LoginTicketRecord implements Serializable {

	/**
     *
     */
	private static final long serialVersionUID = 9092204916064071741L;
	/**
	 * ��½��ˮ��
	 */
	@Id
	@TableGenerator(name = "t_login_ticket", table = "t_libra_seq", pkColumnName = "seq_name", pkColumnValue = "t_login_ticket", valueColumnName = "next_value", initialValue = 0, allocationSize = 100)
	@GeneratedValue(strategy = GenerationType.IDENTITY, generator = "t_login_ticket")
	@Column(name = "login_ticket", nullable = false, updatable = false, insertable = true)
	private Long loginTicket;
	/**
	 * �ͻ�ID����
	 */
	@Column(name = "CUST_ID_TYPE", columnDefinition = "varchar(20)", nullable = false, updatable = false, insertable = true)
	private String custIdType;
	/**
	 * �ͻ�ID
	 */
	@Column(name = "CUST_ID", columnDefinition = "varchar(50)", nullable = false, updatable = false, insertable = true)
	private String custId;

	/**
	 * �ͻ���ַ(�����ַ�����߿���ȡ�õ���ԭʼ��ַ)֧��ipv6
	 */
	@Column(name = "login_addr", columnDefinition = "varchar(50)", nullable = false, updatable = false, insertable = true)
	private String loginAddr;
	/**
	 * Ӧ�ô���
	 */
	@Column(name = "APP_CODE", columnDefinition = "varchar(20)", nullable = false, updatable = false, insertable = true)
	private String appCode;

	/**
	 * ��½����
	 */
	@Deprecated
	@Column(name = "ATTACHMENT", columnDefinition = "varchar(255)", nullable = true, updatable = false, insertable = true)
	private String attachment;

	/**
	 * ���ʱ��
	 */
	@Column(name = "GEN_TIME", nullable = false, updatable = false, insertable = true)
	@Temporal(TemporalType.TIMESTAMP)
	private Date genTime;
	/**
	 * ����ʱ��
	 */
	@Column(name = "UPD_TIME", nullable = false)
	@Temporal(TemporalType.TIMESTAMP)
	private Date updTime;

	public Long getLoginTicket() {
		return loginTicket;
	}

	public void setLoginTicket(Long loginTicket) {
		this.loginTicket = loginTicket;
	}

	public String getCustIdType() {
		return custIdType;
	}

	public void setCustIdType(String custIdType) {
		this.custIdType = custIdType;
	}

	public String getCustId() {
		return custId;
	}

	public void setCustId(String custId) {
		this.custId = custId;
	}

	public String getAppCode() {
		return appCode;
	}

	public void setAppCode(String appCode) {
		this.appCode = appCode;
	}

	public Date getGenTime() {
		return genTime;
	}

	public void setGenTime(Date genTime) {
		this.genTime = genTime;
	}

	public Date getUpdTime() {
		return updTime;
	}

	public void setUpdTime(Date updTime) {
		this.updTime = updTime;
	}

	@Deprecated
	public void setAttachment(String attachment) {
		this.attachment = attachment;
	}

	@Deprecated
	public String getAttachment() {
		return attachment;
	}

	public void setLoginAddr(String loginAddr) {
		this.loginAddr = loginAddr;
	}

	public String getLoginAddr() {
		return loginAddr;
	}

}
